<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>角色修改</title>
    <link rel="stylesheet" type="text/css" href="_ADMIN_css/css.css" />
    <script type="text/javascript" src="_ADMIN_js/jquery.min.js"></script>
</head>
<style>
    .cl{
        clear: both;
    }
    #bigbox>div{
        width: 40%;
        line-height: 2rem;
    }
    #bigbox>div>div:nth-of-type(1){
        width: 50%;
    }
    #bigbox>div>div:nth-of-type(2){
        width: 50%;
    }
</style>
<body>
<div id="pageAll">
    <div class="pageTop">
        <div class="page">
            <img src="_ADMIN_img/coin02.png" /><span><a href="{:url('admin/index/main')}" target="main">首页</a>&nbsp;-&nbsp;
           <a href="{:url('admin/role/role')}" target="main">角色管理</a>&nbsp;-</span>&nbsp;角色修改
        </div>
    </div>
    <div class="page ">
        <!-- 上传广告页面样式 -->
        <div class="banneradd bor">
            <div class="baTop">
                <span>角色管理</span>
            </div>
            <form action="{:url('admin/role/update')}" method="post">
                <div class="baBody">
                    <input type="hidden" name="r_id" value="{$result1['r_id']}">
                    <div class="bbD">
                        角色：<input type="text" class="input1" name="r_name" value="{$result1['r_name']}" />
                    </div>
                    <div class="bbD">
                        父级：
                        <select name="f_id" style="height: 40px">
                            {volist name="result" id="vo"}
                            <option class="sdererere" value ="{$vo.r_id}">{$vo.r_name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="bbD">
                        权限：
                        <div style="width:auto; margin-left: 6%; margin-top: -2%;" id="bigbox">
                            <div>
                                <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[1]" value="1"><span>超级管理权限</span>
                                </div>
                                <div style="float: right">
                                    <input class="sss"  type="checkbox" name="p_id[2]" value="2"><span>推广部管理权限</span>
                                </div>
                            </div>
                            <div class="cl"></div>
                           <div>
                               <div style="float: left">
                                    <input class="sss"  type="checkbox" name="p_id[3]" value="3"><span>电话部管理员权限</span>
                                </div>
                               <div style="float: right">
                                   <input class="sss" type="checkbox" name="p_id[4]" value="4"><span>话务员权限</span>
                               </div>

                           </div>
                            <div class="cl"></div>

                            <div>
                              <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[5]" value="5"><span>前台管理权限</span>
                              </div>
                              <div style="float: right">
                                    <input class="sss" type="checkbox" name="p_id[6]" value="6"><span>咨询部管理权限</span>
                              </div>
                          </div>
                            <div class="cl"></div>

                            <div>
                                <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[7]" value="7"><span>咨询人员权限</span>
                                </div>
                                <div style="float: right">
                                    <input class="sss" type="checkbox" name="p_id[8]" value="8"><span>预科部管理权限</span>
                                </div>
                           </div>
                            <div class="cl"></div>

                            <div>
                                <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[9]" value="9"><span>教务部php管理权限</span>
                                </div>
                                <div>
                                    <input class="sss" type="checkbox" name="p_id[10]" value="10"><span>教务部设计管理权限</span>
                                </div>
                          </div>
                            <div class="cl"></div>

                            <div>
                                <div style="float: left">
                                     <input class="sss" type="checkbox" name="p_id[11]" value="11"><span>项目开发部管理权限</span>
                                </div>
                                <div style="float: right">
                                    <input class="sss" type="checkbox" name="p_id[12]" value="12"><span>开发人员权限</span>
                                </div>
                            </div>
                            <div class="cl"></div>

                            <div>
                                <div style="float: left">
                                    <input class="sss"  type="checkbox" name="p_id[13]" value="13"><span>项目设计部管理权限</span>
                                 </div>
                                <div style="float: right">
                                    <input class="sss"  type="checkbox" name="p_id[14]" value="14"><span>设计人员权限</span>
                                </div>
                           </div>
                            <div class="cl"></div>

                            <div>
                                <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[15]" value="15"><span>就业部全栈设计权限</span>
                                </div>
                                <div style="float: right">
                                    <input class="sss" type="checkbox" name="p_id[16]" value="16"><span>就业部php开发权限</span>
                                </div>
                            </div>
                            <div class="cl"></div>

                            <div>
                                 <div style="float: left">
                                    <input class="sss" type="checkbox" name="p_id[17]" value="17"><span>就业部管理权限</span>
                                </div>
                            </div>
                            <div class="cl"></div>


                        </div>
                        <script>
                            var p="{$result1['p_id']}";
                            if(p!=null){
                                var op= p.split(",");
                                $(".sss").each(function(){
                                    $(this).attr("checed","");
                                });
                                for(var i=0;i<17;i++){
                                    for (var j=0;j<17;j++){
                                        if(parseInt(op[i])==parseInt($(".sss").eq(j).val())){
                                            $(".sss").eq(j).attr("checked","checked");
                                        }else{
                                        }
                                    }
                                }
                            }
                        </script>
                    </div>
                    <div class="bbD">
                        <p class="bbDP">
                            <button class="btn_ok btn_yes" type="submit">提交</button>
                            <a class="btn_ok btn_no" href="{:url('admin/role/role',['page'=> $_SESSION.pageTeam])}">取消</a>
                        </p>
                    </div>
                </div>
            </form>
        </div>

        <!-- 上传广告页面样式end -->
    </div>
</div>
</body>

    <script>
        var count="{$count['count(*)']}";
        var id="{$result1['f_id']}"
        for (var i=0;i<count;i++){
            if(id==$(".sdererere").eq(i).attr("value")){
                $(".sdererere").eq(i).attr("selected","selected");
            }
        }
    </script>

</html>